package com.erlin.store.constant;

import java.util.Objects;

/**
 * @date 2021/6/1 11:00 下午
 * @Author alin
 */
public enum StoreMemberTypeEnum {
    BADMIN(1),  //商铺管理员
    BMEMBER(2), //商铺成员
    BDELIVERY(3);   //商铺配送员
    private int type;

    StoreMemberTypeEnum(int type) {
        this.type = type;
    }

    public int getType() {
        return type;
    }

    public static String getEnumStr(int type){
        StoreMemberTypeEnum[] enums = values();
        for (StoreMemberTypeEnum typeEnum:enums
             ) {
            if(Objects.equals(typeEnum.getType(),type)){
                return typeEnum.toString();
            }
        }
        return null;
    }
}
